package com.huawei.appgallery.assistantdock.buoydock.uikit.window;

import android.content.Context;
import android.util.AttributeSet;
import android.view.KeyEvent;
import android.widget.RelativeLayout;

public class WindowRelativeLayout extends RelativeLayout {
    private b ॱ;

    public interface b {
        void ˊ();
    }

    public void setOnKeyBackEvent(b bVar) {
        this.ॱ = bVar;
    }

    public WindowRelativeLayout(Context context) {
        super(context);
    }

    public WindowRelativeLayout(Context context, AttributeSet attributeSet) {
        super(context, attributeSet);
    }

    public WindowRelativeLayout(Context context, AttributeSet attributeSet, int i) {
        super(context, attributeSet, i);
    }

    public boolean dispatchKeyEvent(KeyEvent keyEvent) {
        if (getVisibility() == 0 && keyEvent.getKeyCode() == 4 && keyEvent.getAction() == 1 && this.ॱ != null) {
            this.ॱ.ˊ();
        }
        return super.dispatchKeyEvent(keyEvent);
    }
}
